package nontax.controller;

import com.bosssoft.trainee.nontax.common.result.Result;
import com.bosssoft.trainee.nontax.entity.vo.RoleVo;
import com.bosssoft.trainee.nontax.service.AuthorizeClientService;
import com.bosssoft.trainee.nontax.service.RoleClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Luo Wenlong
 * @date 2022-06-30 22:11
 * @description:suthorize controller 的 consumer
 * @version:
 */
@RestController
public class AuthorizeConsumerController {
    @Autowired
    private RoleClientService roleClientService;

    @ResponseBody
    @RequestMapping("/consumer/role/getAll")
    public Result<List<RoleVo>> getAllRoles() {
        System.out.println("feign getAll");
        return this.roleClientService.getAllRoles();
    }
}
